#include <iostream>
using namespace std;

void sort(int *arr, int count)
{
    for (int i = 0; i < count; i++)
    {
        /* code */
        for (int j = 0; j < count - 1 - i; j++)
        {
            /* code */
            if (arr[j + 1] < arr[j])
            {
                int temp = arr[j];
                arr[j] = arr[j + 1];
                arr[j + 1] = temp;
            }
        }
    }
}
void printArr(int *arr, int count)
{
    for (int i = 0; i < count; i++)
    {
        /* code */
        cout << arr[i] << " " << endl;
    }
}
int main()
{
    int arr[10] = {4, 3, 6, 9, 1, 2, 10, 8, 7, 5};
    sort(arr, 10);
    // cout << "排序后的数组：" << arr[0] << endl;
    printArr(arr, 10);
    return 0;
}